Vectors and Array Notation
As mentioned earlier, you can create arrays of any fundamental data type, which includes the VECTOR type. Vectors support two methods of accessing the fields of the vector: array-style brackets and dot notation.
To access a vector field using array-style notation, you can append an additional set of brackets to the array reference, and specify the vectors' field index within the second set of brackets. For example,
vec_field[5][2];
will access the second field (the y-component) of the vector in element 5 of the one-dimensional array vec_field. Two-dimensional arrays can also use this notation; if vec_field2 is a two-dimensional array, then
vec_field2[4,5][2];
will access the second field of the vector located in the fourth row and fifth column of the array.
To access a vector field using dot notation, simply append the dot (field access) operator and field identifier to the array reference you want to index. Using the previous example,
vec_field[5].y;
will perform the same operation, accessing the second field (the y-component) of the vector in element 5 of vec_field. Two dimensional arrays work in a similar fashion; the reference
vec_field2[4,5].y;
will access the y-component of the vector located in the fourth row and fifth column of vec_field2.

Arrays in VectorScript : Dynamic Arrays : Vectors and Array Notation

Nemetschek NA
Phone: 410.290.5114
Fax: 410.290.8050